package 力扣._00周赛._422周赛.问题4;

class Solution {
    public int countBalancedPermutations(String num) {
        int total = 0;
        int mod = (int) (Math.pow(10,9) + 7);
        int n = num.length();
        int[] count = new int[10];
        int sum=0;
        for (char c : num.toCharArray()) {
            count[c - '0']++;
            sum += c - '0';
        }
        if(sum%2!=0) return 0;
        // 将sum分成两组，每组和为sum/2
        // 从count中选出一组和为sum/2的数字且数量为 n//2，然后排列组合
        // 装满背包、和为sum/2、满足count的方案数
        // dp[i][j] 表示前i个数中选出和为j的方案数
        int[][] dp = new int[10][sum/2+1];





        return 0;
    }

    public static void main(String[] args) {
        // 80! = 7156945704626380229481153372318653216558465734236575257710944505822703925548014884266894486728081408000000000000000000

    }
}